<div class="pageHeader">
	<form action="<?php echo site_url('admin/video/edit_video_data_line_list');?>" class="pageForm required-validate" id="pagerForm" onsubmit="return validateCallback(this)" method="post">
        <input type="hidden" name="id" id="edit_id" />
	<div class="searchBar">
		<table class="searchContent">
			<tr>
				<td>
					<select name="line" id="edit_line" class="required">
							<?php foreach($line_list as $item):?>
                                                        <option value="<?php echo $item->name;?>"><?php echo $item->name;?></option>
                                                        <?php endforeach;?>
						</select>
				</td>
                                <td>
					地址：<input type="text" name="url" id="edit_url" size="50"/>
				</td>
			</tr>
		</table>
		<div class="subBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit">修改</button></div></div></li>
			</ul>
		</div>
	</div>
	</form>
</div>
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<li><a class="delete" href="<?php echo site_url('admin/video/del_classification_management');?>?tid={sid_user}" target="ajaxTodo" title="确定要删除吗?"><span>删除</span></a></li>
			<li><a class="edit" href="<?php echo site_url('admin/video/edit_classification_management');?>/{sid_user}" target="navTab" rel="reload"><span>刷新</span></a></li>
			<li class="line">line</li>
		</ul>
	</div>
	<table class="table" width="100%" layoutH="138">
		<thead>
			<tr>
				<th width="330">线路名称</th>
				<th width="320">链接</th>
				<th></th>
			</tr>
		</thead>
		<tbody>
		<?php  foreach($data as $item):?>
			<tr target="sid_user" rel="<?php echo $item->id;?>" ondblclick="edit('<?php echo $item->id;?>','<?php echo $item->url;?>','<?php echo $item->line;?>')">
				<td><?php echo $item->line;?></td>
				<td><?php echo $item->url;?></td>
				<td></td>
			</tr>
		<?php endforeach;?>
		</tbody>
	</table>
</div>
<script type="text/javascript">
    function edit(id,url,line)
    {
        $("#edit_id").val(id);
        var s =  document.getElementById("edit_line");
            for(i=0;i<s.length;i++)
            {
                if(s.options[i].value == line){
                s.options[i].selected = true;
                break;
            }
        }
        $("#edit_url").val(url);
    }
</script>